<?php echo $this->load->view($configs->clayout.'/admin/cabecalho'); ?>
<?php echo $this->load->view($configs->clayout.'/menu'); ?>
<div id="colTwo">
	<h2>Adcionar Item de Menu</h2>
	
	<?php echo form_open('admin/submenussave'); ?>
	<p>Adcionar este item no menu: <?php echo $menuselecionado->mtitulo.br(); ?>
		<?php echo form_hidden('idmenus', $menuselecionado->idmenus); ?>
	</p>
	<p>Titulo
		<?php echo $this->validation->titulo_error; ?>
		<?php echo form_input('titulo', $this->validation->titulo).br(); ?>
		<script type="text/javascript">
		document.forms[0].titulo.focus();
		</script>
	</p>
	<p>Ordem
		<?php echo $this->validation->ordem_error; ?>
		<?php echo form_input('ordem', $this->validation->ordem).br(); ?>
	</p>
	<p>Link
		<?php echo $this->validation->link_error; ?>
		<?php switch ($tipolink) {
			case "noticias":
			echo form_dropdown('link', $noticias);
			break;
			
			case "paginas":
			echo form_dropdown('link', $paginas);
			break;
			
			default:
			echo form_input('link', $this->validation->link);
			break;
		}
		 ?>
		 <a href="<?php echo site_url("/admin/submenusadd/".$menuselecionado->idmenus); ?>" >Url</a>
		 <a href="<?php echo site_url("/admin/submenusadd/".$menuselecionado->idmenus."/noticias"); ?>" >Noticia</a> 
		 <a href="<?php echo site_url("/admin/submenusadd/".$menuselecionado->idmenus."/paginas");  ?>" >Pagina</a>
	</p>
	<p>Abrir
		<?php echo form_dropdown('target', array( '_self' => 'Na Mesma Janela', '_blank' => 'Em Nova Janela')).br(); ?>
	</p>
	
	<?php echo form_hidden('acao','salvar'); ?>
	<?php echo form_hidden('tipolink',$tipolink); ?>
	<?php echo form_submit('salvar','Salvar'); ?>
	<input type="button" value="Voltar" onClick="javascript:history.go(-1)" >  
	<?php echo form_close(); ?>
	<?php //echo $this->validation->error_string; ?>
</div>
<?php //echo $this->load->view($configs->clayout.'/menudir'); ?>
<?php echo $this->load->view($configs->clayout.'/rodape'); ?>